/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.fi.muni.diplomka.common;

import cz.fi.muni.diplomka.common.enumeration.ResourceType;
import cz.fi.muni.diplomka.common.enumeration.UnitType;
import java.util.List;

/**
 * Class representing Unit
 * 
 * @author Jakub Kutil
 */
public class Unit {

    private UnitType name;
    private int health;
    private int attack;
    private int defense;
    private int damageLow;
    private int damageHigh;
    private int armor;
    private int initiative;
    private int speed;
    private int carry;
    private List<ResourceType> equipment;
    private int priceFood;
    private int priceGold;
    private int level;

    public Unit() {
    }

    public UnitType getName() {
        return name;
    }

    public void setName(UnitType name) {
        this.name = name;
    }

    public int getHealth() {
        return health;
    }

    public void setHealth(int health) {
        this.health = health;
    }

    public int getAttack() {
        return attack;
    }

    public void setAttack(int attack) {
        this.attack = attack;
    }

    public int getDefense() {
        return defense;
    }

    public void setDefense(int defense) {
        this.defense = defense;
    }

    public int getDamageLow() {
        return damageLow;
    }

    public void setDamageLow(int damageLow) {
        this.damageLow = damageLow;
    }

    public int getDamageHigh() {
        return damageHigh;
    }

    public void setDamageHigh(int damageHigh) {
        this.damageHigh = damageHigh;
    }

    public int getArmor() {
        return armor;
    }

    public void setArmor(int armor) {
        this.armor = armor;
    }

    public int getInitiative() {
        return initiative;
    }

    public void setInitiative(int initiative) {
        this.initiative = initiative;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public int getCarry() {
        return carry;
    }

    public void setCarry(int carry) {
        this.carry = carry;
    }

    public List<ResourceType> getEquipment() {
        return equipment;
    }

    public void setEquipment(List<ResourceType> equipment) {
        this.equipment = equipment;
    }

    public int getPriceFood() {
        return priceFood;
    }

    public void setPriceFood(int priceFood) {
        this.priceFood = priceFood;
    }

    public int getPriceGold() {
        return priceGold;
    }

    public void setPriceGold(int priceGold) {
        this.priceGold = priceGold;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    @Override
    public String toString() {
        return "Unit{" + "name=" + name + ", health=" + health + ", attack=" + attack + ", defense=" + defense + ", damageLow=" + damageLow + ", damageHigh=" + damageHigh + ", armor=" + armor + ", initiative=" + initiative + ", speed=" + speed + ", carry=" + carry + ", equipment=" + equipment + ", priceFood=" + priceFood + ", priceGold=" + priceGold + '}';
    }

    public void lowerHealth(int health) {
        this.health -= health;
    }
}
